#ifndef MTA_COOLNESS
#define MTA_COOLNESS

#include <vector>
#include <iostream>
#include <fstream>
#include <list>
#include <map>
#include <queue>


#include "TrainStopData.h"

namespace mta{

	class MTAData {
	public:
		MTAData(const std::string& file1, const std::string& file2);
			//read that file!
			//drop data into vTSD and mTSD
			//build AL from file2
			//sort vTSD by name into sTSD
		std::list<std::string> hereToThere(const std::string& a, const std::string& b);
		void printAL();

		//Extra Credit
		trainStopData* getById(const std::string& name);
		template<class UTSDP>
		std::list<std::string> hereToThere(const std::string& a, UTSDP pred);
		template<class itr, class func1, class func2>
		void perform_if(itr start, itr end,func1 pred, func2 op);
		template<class func1, class func2>
		void perform_if(func1 pred, func2 op){
			perform_if(vTSD.begin(), vTSD.end(), pred, op);
		}
	private:
		std::vector<trainStopData*> vTSD;	//Index to Actual Stop
		std::map<std::string, int> mTSD; 		//ID to index
		std::vector< std::list<std::string> > adjacencyList;
	};

	//templated function implementations in here
	#include "mta.tpp"
}

#endif